//
//  ZYMultipartFormDataStream.h
//  ZYWebImage
//
//  Created by wangzhipan on 2025/4/2.
//

/*
 大文件上传使用的复合流，继承自NSInputStream：
 使用BodyInput上传大文件，每一个参数都需要封装成一个NSInputStream
 再把多个NSInputStream封装在ZYMultipartFormDataStream中
 
 重写NSInputStream的read、get等方法，来自定义复合流的读取
 */
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ZYMultipartFormDataStream : NSInputStream <NSCopying>

@property (nonatomic, readonly) unsigned long long contentLength;

- (instancetype)initWithBoundary:(NSString *)boundary
                          params:(NSDictionary<NSString *, NSString *> *)params
                            name:(NSString *)name
                        fileName:(NSString *)fileName
                         fileURL:(NSURL *)fileURL
                        mimeType:(NSString *)mimeType
                  stringEncoding:(NSStringEncoding)stringEncoding;
@end

NS_ASSUME_NONNULL_END
